chore(ci): bump socket-registry action refs to main (6147a08c)#111
Closed
chore(ci): bump socket-registry action refs to main (6147a08c)#111
Conversation
- lib/native.d.ts: Full type definitions for all 248 node-api bindings - lib/index.mjs: Platform-detecting loader with RGBA class and enums - lib/index.d.ts: Type declarations for the wrapper module - test/bindings.test.mjs: 25 integration tests covering module loading, renderer, buffer, text buffer, edit buffer, editor view, syntax style, and links - Updated package.json exports with proper entry points - Fixed vitest config to only run package tests
137 tests covering: module loading, RGBA helper, constants, renderer lifecycle, optimized buffer operations (clear, fill, draw, scissor, opacity, resize, compositing), text buffer (append, clear, reset, defaults, tabs, highlights, memory buffers), text buffer view (wrapping, selection, viewport, measurement), edit buffer (text ops, cursor movement, undo/redo, line operations, word boundaries, coordinate conversion), editor view (viewport, wrapping, selection, visual cursor, drawing), syntax style (registration, lookup, attribute combos, bulk styles), links (alloc, resolve, attribute packing), hit grid, and buffer+view integration drawing.
Threadsafe callbacks (no more TODOs/no-ops): - setLogCallback: TSFN bridge for log messages from native render thread - setEventCallback: TSFN bridge for native events (input, resize, etc.) - streamSetCallback: TSFN bridge for NativeSpanFeed stream notifications All three properly create/release napi_threadsafe_function, handle undefined/null to clear callbacks, and use nonblocking queue mode. Performance APIs for zero-copy buffer access: - bufferGetCharArrayBuffer/FgArrayBuffer/BgArrayBuffer/AttributesArrayBuffer: Return external ArrayBuffers backed by native memory (no copy) - bufferDrawTextEncoded: Accept pre-encoded Uint8Array to skip per-call UTF-8 conversion overhead - editBufferGetCursorInto/editorViewGetCursorInto/getCursorStateInto: Write cursor state into reusable typed arrays (no object allocation) JS wrapper additions: - BufferView class: Lazy typed array views over native buffer memory with direct cell writes (bypass FFI for bulk updates) - CursorState class: Reusable cursor reader (zero allocation per read) - encodeText(): Cached TextEncoder for pre-encoding text napi.zig additions: - createThreadsafeFunction/callThreadsafeFunction/releaseThreadsafeFunction - acquireThreadsafeFunction for multi-thread access - getTypedArrayInfo for reading typed array data pointers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary